<template>
    <el-collapse v-model="activeName" @change="handleChange" accordion>
        <el-collapse-item name="search">
            <template slot="title">
                <!-- 插槽 标题参数 -->
                <slot name="titleLine"></slot>

                <!-- <span class="text-span">{{ activeName ? '收起筛选' : '展开筛选' }}</span> -->
                <span class="text-span2" style="margin-left: -90px; position: relative; z-index: 999; color: #409eff">更多查询条件</span>
            </template>
            <!-- 内容插槽 -->
            <slot></slot>
        </el-collapse-item>
    </el-collapse>
</template>
<script lang="ts">
import { Component, Vue, Emit, Model, Prop, Watch } from 'vue-property-decorator';

@Component({ name: 'RiskCollapse' })
export default class RiskCollapse extends Vue {
    activeName: string = '';

    @Emit()
    handleChange(command: string) {
        return command;
    }
}
</script>
<style lang="scss" scoped>
.text-span {
    position: absolute;
    width: 60px;
    height: 20px;
    line-height: 20px;
    right: 20px;
}

/deep/ .el-collapse-item__header {
    display: -webkit-box;
    height: 40px;
    line-height: 40px;
}

/deep/ .el-collapse-item__header {
    border: none;
}

/deep/ .el-collapse-item__arrow {
    // margin: -20px;
}

/deep/ .el-collapse-item__content {
    padding: 0;
}

/deep/ .el-collapse {
    border-top: none;
}

/deep/ .el-icon-arrow-right:before {
    content: '\e6df';
}

/deep/ .el-collapse-item__arrow.is-active {
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg);
}

/deep/ .el-collapse-item__arrow {
    color: #409eff;
}

/deep/ .el-collapse-item__wrap {
    border: none;
    width: calc(100vw - 10px);

    .el-collapse-item__content {
        width: 100%;
        display: flex;
        .el-row {
            width: 100%;
        }
    }
}
</style>
